<!--{if $hash_verify}-->

function jsg_get_page_url() {
	var url = location.href;
	var i = url.indexOf('#');
	if (i == -1) {
		return url;
	} else {
		return url.substr(0, i);
	}
}

function jsg_get_page_title() {
	return document.title;
}

var iframe_src = '{$this->Config[site_url]}/index.php?mod=output&code=url_iframe&target_id={$target_id}&id={$id}&hash={$hash}&per_page_num={$per_page_num}&content_default=' + encodeURIComponent('{$content_default}') + '&url=' + encodeURIComponent(jsg_get_page_url()) + '&title=' + encodeURIComponent(jsg_get_page_title());

document.getElementById('{$target_id}').innerHTML = '<iframe id="{$target_id}_iframe" src="' + iframe_src + '" style="width: {$width}; height: {$height}; border:none; overflow:hidden; " frameBorder="0" scrolling="no"></iframe>';

<!--{if '100%'==$width && '1000px'==$height}-->
/*
document.getElementById('jishigou_div').style.height=100 + '%'; 
document.getElementById('jishigou_div').style.width=100 + '%';  
*/
document.getElementById('{$target_id}_iframe').style.height = document.body.scrollHeight; 
document.getElementById('{$target_id}_iframe').style.width = (document.getElementById('{$target_id}').style.width > 0 ? document.getElementById('{$target_id}').style.width : document.body.scrollWidth) - 10;
<!--{/if}-->


<!--{else}-->

document.getElementById('{$target_id}').innerHTML = '调用地址不正确，请确认';

<!--{/if}-->